<template>
	<div class="view_search_product">
		<div class="pic">
			<img :src="data.image" alt="" />
		</div>
		<div class="body">
			<h3>{{data.name}}</h3>
			<p v-html="data.desc" class="desc"></p>
			<p>{{data.price}}</p>
		</div>
	</div>
</template>

<script>
	export default {
		props: {
			data: {
				type: Object
			}
		}
	}
</script>

<style lang="scss" scoped>
	.view_search_product {
		display: flex;
		margin-bottom: .15rem;
		.desc{
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 2; /* 这里是超出几行省略 */
			overflow: hidden;
			font-size: .2rem;
		}
		.pic {
			width: 35%;
			img {
				width: 100%;
			}
		}

		.body {
			flex: 1;
		}

	}
</style>
